package com.okami.sourcecode.spring.component.initializingbean;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Component;

/** 这种类型的bean,会执行afterPropertiesSet(),进行初始化操作
 *  例如: ThreadPoolTaskExecutor就用到了,利用afterPropertiesSet()调用了initializeExecutor()进行设置jdk的ThreadPoolExecutor,装饰器模式,都是Executor.
 * @author: TanJingyu
 * @create: 2020-12-17 14:58
 **/
@Component
public class OkamiInitiallizingBean implements InitializingBean {
    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("我的初始化bean.................");
    }
}
